Optimal. Leaf size=152 \[ \frac {a (4 A+3 (B+C)) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a (5 A+5 B+4 C) \tan (c+d x)}{5 d}+\frac {a (4 A+3 (B+C)) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a (B+C) \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {a C \sec ^4(c+d x) \tan (c+d x)}{5 d}+\frac {a (5 A+5 B+4 C) \tan ^3(c+d x)}{15 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 152, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {4161, 4132,
3852, 4131, 3853, 3855} \begin {gather*} \frac {a (5 A+5 B+4 C) \tan ^3(c+d x)}{15 d}+\frac {a (5 A+5 B+4 C) \tan (c+d x)}{5 d}+\frac {a (4 A+3 (B+C)) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a (4 A+3 (B+C)) \tan (c+d x) \sec (c+d x)}{8 d}+\frac {a (B+C) \tan (c+d x) \sec ^3(c+d x)}{4 d}+\frac {a C \tan (c+d x) \sec ^4(c+d x)}{5 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3852
Rule 3853
Rule 3855
Rule 4131
Rule 4132
Rule 4161
Rubi steps
\begin {align*} \int \sec ^3(c+d x) (a+a \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\frac {a C \sec ^4(c+d x) \tan (c+d x)}{5 d}+\frac {1}{5} \int \sec ^3(c+d x) \left (5 a A+a (5 A+5 B+4 C) \sec (c+d x)+5 a (B+C) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {a C \sec ^4(c+d x) \tan (c+d x)}{5 d}+\frac {1}{5} \int \sec ^3(c+d x) \left (5 a A+5 a (B+C) \sec ^2(c+d x)\right ) \, dx+\frac {1}{5} (a (5 A+5 B+4 C)) \int \sec ^4(c+d x) \, dx\\ &=\frac {a (B+C) \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {a C \sec ^4(c+d x) \tan (c+d x)}{5 d}+\frac {1}{4} (a (4 A+3 (B+C))) \int \sec ^3(c+d x) \, dx-\frac {(a (5 A+5 B+4 C)) \text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (c+d x)\right )}{5 d}\\ &=\frac {a (5 A+5 B+4 C) \tan (c+d x)}{5 d}+\frac {a (4 A+3 (B+C)) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a (B+C) \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {a C \sec ^4(c+d x) \tan (c+d x)}{5 d}+\frac {a (5 A+5 B+4 C) \tan ^3(c+d x)}{15 d}+\frac {1}{8} (a (4 A+3 (B+C))) \int \sec (c+d x) \, dx\\ &=\frac {a (4 A+3 (B+C)) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a (5 A+5 B+4 C) \tan (c+d x)}{5 d}+\frac {a (4 A+3 (B+C)) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a (B+C) \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {a C \sec ^4(c+d x) \tan (c+d x)}{5 d}+\frac {a (5 A+5 B+4 C) \tan ^3(c+d x)}{15 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.11, size = 101, normalized size = 0.66 \begin {gather*} \frac {a \left (15 (4 A+3 (B+C)) \tanh ^{-1}(\sin (c+d x))+\tan (c+d x) \left (15 (4 A+3 (B+C)) \sec (c+d x)+30 (B+C) \sec ^3(c+d x)+8 \left (15 (A+B+C)+5 (A+B+2 C) \tan ^2(c+d x)+3 C \tan ^4(c+d x)\right )\right )\right )}{120 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.94, size = 210, normalized size = 1.38
method | result | size |
norman | \(\frac {-\frac {a \left (4 A +3 B +3 C \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}-\frac {a \left (12 A +13 B +13 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {a \left (20 A +29 B +13 C \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}-\frac {4 a \left (25 A +25 B +29 C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{15 d}+\frac {a \left (44 A +35 B +19 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{5}}-\frac {a \left (4 A +3 B +3 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {a \left (4 A +3 B +3 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(208\) |
derivativedivides | \(\frac {-A a \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+B a \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )-a C \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )+A a \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-B a \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+a C \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(210\) |
default | \(\frac {-A a \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+B a \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )-a C \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )+A a \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-B a \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+a C \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(210\) |
risch | \(-\frac {i a \left (60 A \,{\mathrm e}^{9 i \left (d x +c \right )}+45 B \,{\mathrm e}^{9 i \left (d x +c \right )}+45 C \,{\mathrm e}^{9 i \left (d x +c \right )}+120 A \,{\mathrm e}^{7 i \left (d x +c \right )}+210 B \,{\mathrm e}^{7 i \left (d x +c \right )}+210 C \,{\mathrm e}^{7 i \left (d x +c \right )}-240 A \,{\mathrm e}^{6 i \left (d x +c \right )}-240 B \,{\mathrm e}^{6 i \left (d x +c \right )}-560 A \,{\mathrm e}^{4 i \left (d x +c \right )}-560 B \,{\mathrm e}^{4 i \left (d x +c \right )}-640 C \,{\mathrm e}^{4 i \left (d x +c \right )}-120 A \,{\mathrm e}^{3 i \left (d x +c \right )}-210 B \,{\mathrm e}^{3 i \left (d x +c \right )}-210 C \,{\mathrm e}^{3 i \left (d x +c \right )}-400 A \,{\mathrm e}^{2 i \left (d x +c \right )}-400 B \,{\mathrm e}^{2 i \left (d x +c \right )}-320 C \,{\mathrm e}^{2 i \left (d x +c \right )}-60 \,{\mathrm e}^{i \left (d x +c \right )} A -45 B \,{\mathrm e}^{i \left (d x +c \right )}-45 C \,{\mathrm e}^{i \left (d x +c \right )}-80 A -80 B -64 C \right )}{60 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{2 d}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{8 d}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{8 d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{2 d}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{8 d}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{8 d}\) | \(392\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 266, normalized size = 1.75 \begin {gather*} \frac {80 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} A a + 80 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} B a + 16 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} C a - 15 \, B a {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 15 \, C a {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 60 \, A a {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{240 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.36, size = 164, normalized size = 1.08 \begin {gather*} \frac {15 \, {\left (4 \, A + 3 \, B + 3 \, C\right )} a \cos \left (d x + c\right )^{5} \log \left (\sin \left (d x + c\right ) + 1\right ) - 15 \, {\left (4 \, A + 3 \, B + 3 \, C\right )} a \cos \left (d x + c\right )^{5} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (16 \, {\left (5 \, A + 5 \, B + 4 \, C\right )} a \cos \left (d x + c\right )^{4} + 15 \, {\left (4 \, A + 3 \, B + 3 \, C\right )} a \cos \left (d x + c\right )^{3} + 8 \, {\left (5 \, A + 5 \, B + 4 \, C\right )} a \cos \left (d x + c\right )^{2} + 30 \, {\left (B + C\right )} a \cos \left (d x + c\right ) + 24 \, C a\right )} \sin \left (d x + c\right )}{240 \, d \cos \left (d x + c\right )^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a \left (\int A \sec ^{3}{\left (c + d x \right )}\, dx + \int A \sec ^{4}{\left (c + d x \right )}\, dx + \int B \sec ^{4}{\left (c + d x \right )}\, dx + \int B \sec ^{5}{\left (c + d x \right )}\, dx + \int C \sec ^{5}{\left (c + d x \right )}\, dx + \int C \sec ^{6}{\left (c + d x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 299 vs.
\(2 (142) = 284\).
time = 0.51, size = 299, normalized size = 1.97 \begin {gather*} \frac {15 \, {\left (4 \, A a + 3 \, B a + 3 \, C a\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 15 \, {\left (4 \, A a + 3 \, B a + 3 \, C a\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (60 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 45 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 45 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 200 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 290 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 130 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 400 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 400 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 464 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 440 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 350 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 190 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 180 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 195 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 195 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{5}}}{120 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.56, size = 251, normalized size = 1.65 \begin {gather*} \frac {a\,\mathrm {atanh}\left (\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (4\,A+3\,B+3\,C\right )}{2\,\left (2\,A\,a+\frac {3\,B\,a}{2}+\frac {3\,C\,a}{2}\right )}\right )\,\left (4\,A+3\,B+3\,C\right )}{4\,d}-\frac {\left (A\,a+\frac {3\,B\,a}{4}+\frac {3\,C\,a}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (-\frac {10\,A\,a}{3}-\frac {29\,B\,a}{6}-\frac {13\,C\,a}{6}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {20\,A\,a}{3}+\frac {20\,B\,a}{3}+\frac {116\,C\,a}{15}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-\frac {22\,A\,a}{3}-\frac {35\,B\,a}{6}-\frac {19\,C\,a}{6}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (3\,A\,a+\frac {13\,B\,a}{4}+\frac {13\,C\,a}{4}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________